home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 January
/
PCWorld_2007-01_cd.bin
/
v cisle
/
autoit
/
autoit-v3.2.0.1-setup.exe
/
Include
/
GuiSlider.au3
< prev
next >
Wrap
Text File
|
2006-07-22
|
11KB
|
220 lines
; Include Version:1.66 (17 July 2006)
#include-once
#include <SliderConstants.au3>
; ------------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1++
; Language: English
; Description: Functions that assist with Slider Control "Trackbar".
;
; ------------------------------------------------------------------------------
; function list
;===============================================================================
; _GUICtrlSliderClearTics
; _GUICtrlSliderGetLineSize
; _GUICtrlSliderGetNumTics
; _GUICtrlSliderGetPageSize
; _GUICtrlSliderGetPos
; _GUICtrlSliderGetRangeMax
; _GUICtrlSliderGetRangeMin
; _GUICtrlSliderSetLineSize
; _GUICtrlSliderSetPageSize
; _GUICtrlSliderSetPos
; _GUICtrlSliderSetTicFreq
;===============================================================================
;===============================================================================
;
; Description: _GUICtrlSliderClearTics
; Parameter(s): $h_slider - handle of the control
; Requirement: None
; Return Value(s): None
; User CallTip: _GUICtrlSliderClearTics($h_slider) Removes the current tick marks from a slider. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s): This does not remove the first and last tick marks, which are created automatically
;
;===============================================================================
Func _GUICtrlSliderClearTics($h_slider)
DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_CLEARTICS, "int", 1, "int", 0)
EndFunc ;==>_GUICtrlSliderClearTics
;===============================================================================
;
; Description: _GUICtrlSliderGetLineSize
; Parameter(s): $h_slider - handle of the control
; Requirement: None
; Return Value(s): Returns value that specifies the line size for the slider.
; User CallTip: _GUICtrlSliderGetLineSize($h_slider) Retrieves the number of logical positions the slider moves. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s): Retrieves the number of logical positions the slider moves in response to keyboard input from the arrow keys.
; The logical positions are the integer increments in the slider's range of minimum to maximum slider positions.
;
;===============================================================================
Func _GUICtrlSliderGetLineSize($h_slider)
Local $ret
$ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_GETLINESIZE, "int", 0, "int", 0)
Return $ret[0]
EndFunc ;==>_GUICtrlSliderGetLineSize
;===============================================================================
;
; Description: _GUICtrlSliderGetNumTics
; Parameter(s): $h_slider - handle of the control
; Requirement: None
; Return Value(s): If no tick flag is set, it returns 2 for the beginning and ending ticks.
; If $TBS_NOTICKS is set, it returns zero.
; Otherwise, it takes the difference between the range minimum and maximum, divides by the tick frequency, and adds 2.
; User CallTip: _GUICtrlSliderGetNumTics($h_slider) Retrieves the number of tick marks from a slider. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s):
;
;===============================================================================
Func _GUICtrlSliderGetNumTics($h_slider)
Local $ret
$ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_GETNUMTICS, "int", 0, "int", 0)
Return $ret[0]
EndFunc ;==>_GUICtrlSliderGetNumTics
;===============================================================================
;
; Description: _GUICtrlSliderGetPageSize
; Parameter(s): $h_slider - handle of the control
; Requirement: None
; Return Value(s): Returns a value that specifies the page size for the slider.
; User CallTip: _GUICtrlSliderGetPageSize($h_slider) Retrieves the number of logical positions the slider moves. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s): Retrieves the number of logical positions the slider moves in response to keyboard input,
; or mouse input, such as clicks in the sliders's channel.
; The logical positions are the integer increments in the slider's range of minimum to maximum slider positions.
;
;===============================================================================
Func _GUICtrlSliderGetPageSize($h_slider)
Local $ret
$ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_GETPAGESIZE, "int", 0, "int", 0)
Return $ret[0]
EndFunc ;==>_GUICtrlSliderGetPageSize
;===============================================================================
;
; Description: _GUICtrlSliderGetPos
; Parameter(s): $h_slider - handle of the control
; Requirement: None
; Return Value(s): Returns a value that specifies the logical position of the slider.
; User CallTip: _GUICtrlSliderGetPos($h_slider) Retrieves the logical position the slider. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s):
;
;===============================================================================
Func _GUICtrlSliderGetPos($h_slider)
Local $ret
$ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_GETPOS, "int", 0, "int", 0)
Return $ret[0]
EndFunc ;==>_GUICtrlSliderGetPos
;===============================================================================
;
; Description: _GUICtrlSliderGetRangeMax
; Parameter(s): $h_slider - handle of the control
; Requirement: None
; Return Value(s): Returns a value that specifies the maximum position in the slider's range of minimum to maximum slider positions.
; User CallTip: _GUICtrlSliderGetRangeMax($h_slider) Retrieves the maximum position for the slider. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s):
;
;===============================================================================
Func _GUICtrlSliderGetRangeMax($h_slider)
Local $ret
$ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_GETRANGEMAX, "int", 0, "int", 0)
Return $ret[0]
EndFunc ;==>_GUICtrlSliderGetRangeMax
;===============================================================================
;
; Description: _GUICtrlSliderGetRangeMin
; Parameter(s): $h_slider - handle of the control
; Requirement: None
; Return Value(s): Returns a value that specifies the minimum position in the slider's range of minimum to maximum slider positions.
; User CallTip: _GUICtrlSliderGetRangeMin($h_slider) Retrieves the minimum position for the slider. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s):
;
;===============================================================================
Func _GUICtrlSliderGetRangeMin($h_slider)
Local $ret
$ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_GETRANGEMIN, "int", 0, "int", 0)
Return $ret[0]
EndFunc ;==>_GUICtrlSliderGetRangeMin
;===============================================================================
;
; Description: _GUICtrlSliderSetLineSize
; Parameter(s): $h_slider - handle of the control
; $i_linesize - New line size.
; Requirement: None
; Return Value(s): Returns a value that specifies the previous line size.
; User CallTip: _GUICtrlSliderSetLineSize($h_slider, $i_linesize) Sets the number of logical positions the slider moves. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s): Sets the number of logical positions the slider moves in response to keyboard input from the arrow keys.
; The logical positions are the integer increments in the slider's range of minimum to maximum slider positions.
;
;===============================================================================
Func _GUICtrlSliderSetLineSize($h_slider, $i_linesize)
Local $ret
$ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_SETLINESIZE, "int", 0, "int", $i_linesize)
Return $ret[0]
EndFunc ;==>_GUICtrlSliderSetLineSize
;===============================================================================
;
; Description: _GUICtrlSliderSetPageSize
; Parameter(s): $h_slider - handle of the control
; $i_pagesize - New page size.
; Requirement: None
; Return Value(s): Returns a value that specifies the previous page size.
; User CallTip: _GUICtrlSliderSetPageSize($h_slider, $i_pagesize) Sets the number of logical positions the slider moves. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s): Sets the number of logical positions the slider moves in response to keyboard input,
; or mouse input, such as clicks in the slider's channel.
; The logical positions are the integer increments in the slider's range of minimum to maximum slider positions.
;
;===============================================================================
Func _GUICtrlSliderSetPageSize($h_slider, $i_pagesize)
Local $ret
$ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_SETPAGESIZE, "int", 0, "int", $i_pagesize)
Return $ret[0]
EndFunc ;==>_GUICtrlSliderSetPageSize
;===============================================================================
;
; Description: _GUICtrlSliderSetPos
; Parameter(s): $h_slider - handle of the control
; $i_pos - New logical position of the slider.
; Requirement: None
; Return Value(s): None
; User CallTip: _GUICtrlSliderSetPos($h_slider, $i_pos) Sets the current logical position of the slider. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s):
;
;===============================================================================
Func _GUICtrlSliderSetPos($h_slider, $i_pos)
DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_SETPOS, "int", 1, "int", $i_pos)
EndFunc ;==>_GUICtrlSliderSetPos
;===============================================================================
;
; Description: _GUICtrlSliderSetTicFreq
; Parameter(s): $h_slider - handle of the control
; $i_freq - Frequency of the tick marks.
; Requirement: None
; Return Value(s): None
; User CallTip: _GUICtrlSliderSetTicFreq($h_slider, $i_freq) Sets the interval frequency for tick marks in a slider. (required: <GuiSlider.au3>)
; Author(s): Gary Frost (custompcs at charter dot net)
; Note(s): The slider must have the $TBS_AUTOTICKS style to use this.
;
;===============================================================================
Func _GUICtrlSliderSetTicFreq($h_slider, $i_freq)
DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_SETTICFREQ, "int", $i_freq, "int", 0)
EndFunc ;==>_GUICtrlSliderSetTicFreq